package com.lin.entity.key;

import lombok.Data;

import java.util.Objects;

@Data
public class WsDataMapKey {
    private String taskName;
    private Long userId;

    public WsDataMapKey(String taskName, Long userId) {
        this.taskName = taskName;
        this.userId = userId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        WsDataMapKey that = (WsDataMapKey) o;
        return taskName.equals(that.taskName) && userId.equals(that.userId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(taskName, userId);
    }
}
